package com.lmaye.design.patterns.structural.adapter.objectadapter;

import com.lmaye.design.patterns.structural.adapter.Adaptor;
import com.lmaye.design.patterns.structural.adapter.Target;

/**
 * -- Object Adapter
 * - 对象适配器模式
 *
 * @author lmay.Zhou
 * @date 2020/12/11 17:39
 * @email lmay@lmaye.com
 */
public class ObjectAdapter implements Target {
    /**
     * Adaptor
     */
    private final Adaptor adaptor;

    public ObjectAdapter(Adaptor adaptor) {
        this.adaptor = adaptor;
    }

    @Override
    public void request() {
        adaptor.specificRequest();
    }
}
